<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:common="http://java.sun.com/jsf/composite/common">
<h:body>
	<ui:composition template="/pages/templates/MainTemplate.xhtml">
		<ui:define name="content">
			<div>
				<h3>Articulos</h3>
			</div>
			<h:form id="addOperatorForm" styleClass="tableNoGrid">
				<p:growl id="addMessages" showDetail="true" globalOnly="true"
					autoUpdate="true" showSummary="true"></p:growl>
				<common:CRUDMenuBar id="operatorsMenuBar"
					crudManagedBean="#{operatorsMB}">
				</common:CRUDMenuBar>
				<common:operators selectButtonRendered="false" id="operators" />

				<h:panelGroup layout="block" id="abm_id" style="margin-top:20px;">
					<h:panelGroup rendered="#{operatorsMB.showAbm}">
						<ui:include src="produccion/operatorsAbm.xhtml"></ui:include>
						<p:panelGrid id="buttonsContainer" columns="1">
							<p:row>
								<p:column>
									<p:commandButton id="addOperatorButton"
										rendered="#{!operatorsMB.editing}"
										actionListener="#{operatorsMB.addOperator}" value="Agregar"
										icon="ui-icon-arrowthick-1-n"
										update=":addOperatorForm:abm_id addOperatorForm:operators:operators"
										style="margin-top: 10px;" />
									<p:commandButton id="saveOperatorButton"
										rendered="#{operatorsMB.editing}"
										actionListener="#{operatorsMB.saveOperator}" value="Guardar"
										icon="ui-icon-disk"
										update=":addOperatorForm:abm_id addOperatorForm:operators:operators"
										style="margin-top: 10px;" />
									<p:commandButton id="cancelOperatorButton"
										actionListener="#{operatorsMB.resetOperator}" value="Cancelar"
										icon="ui-icon-cancel"
										update=":addOperatorForm:abm_id  addOperatorForm:operators:operators"
										style="margin-top: 10px;" process="@this" />
								</p:column>
							</p:row>
						</p:panelGrid>
					</h:panelGroup>
				</h:panelGroup>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>